package com.example.woke;

import com.zhongcai.online.R;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class ZcaipayokActivity extends Activity {

	private Intent intent;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_zcaipayok);
		intent = getIntent();
		String user_nicename = intent.getStringExtra("user_nicename");
		String money = intent.getStringExtra("money");
		TextView mTwait = (TextView) findViewById(R.id.avzcaiok_image_wait);
		TextView mText = (TextView) findViewById(R.id.zcaiokpay_name);
		findViewById(R.id.avzcaiok_image_start).setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				intent.setClass(ZcaipayokActivity.this, MainActivity.class);
//				Datas_main data = new Datas_main();
//				data.silsdj = true;
//				EventBus.getDefault().post(data);
				intent.putExtra("sdsdsf", "sddfsdf");
				startActivity(intent);
				finish();
			}
		});
		Drawable drawable= getResources().getDrawable(R.drawable.zcaiokpay1);  
		/// ��һ������Ҫ��,���򲻻���ʾ.  
		drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());  
		if(user_nicename.equals("user_nicename")){
			mTwait.setCompoundDrawables(drawable,null,null,null);  
			mTwait.setText(" 订单处理中");
			mText.setVisibility(View.GONE);
		}else{
			mText.setText(user_nicename+"向你收取￥"+money+", 付款成功");
		}
		findViewById(R.id.avzcaiok_image_back).setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				finish();
			}
		});
	}
	
}
